import java.io.*;
import java.math.BigInteger;

class Fib {

  public static BigInteger fib(int n) {

    BigInteger prev = new BigInteger("0");
    BigInteger cur = new BigInteger("1");

    for (int i = 0; i < n; i++) {
      BigInteger v = prev.add(cur);
      prev = cur;
      cur = v;
    }

    return cur;
  }

  public static void main(String args[]) {
    int n = Integer.parseInt(args[0]);
    System.out.println(fib(n));
  }
}
